num = input("请输入五位数的自然数n:")
newnum = ""
for i in range(len(num)):
     newnum = newnum + num[-(i+1)]
# print(newnum)
if newnum == num:
    print("{}是回文数字".format(num))
else:
    print("{}不是回文数字".format(num))
